package com.zhihao.takeaway.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhihao.takeaway.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select distinct user.id,user.username,user.account from user,orders where orders.employee_id = #{employeeId} and ( orders.status = 3 or orders.status = 4 ) and orders.user_id = user.id")
    List<User> selectUserAboutOrders(String employeeId);
}
